home *** CD-ROM | disk | FTP | other *** search
- Path: news.rain.org!usenet
- From: "Guus Leeuw jr." <guusl@eiffel.com>
- Newsgroups: comp.lang.c
- Subject: Re: Please Please Help! - pointer notation
- Date: Wed, 28 Feb 1996 15:30:26 -0800
- Organization: Interactive Software Engineering Inc. http://www.eiffel.com/
- Message-ID: <3134E592.405239E2@eiffel.com>
- NNTP-Posting-Host: @outback.eiffel.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; Linux 1.2.8 i586)
- CC: scs@eskimo.com
-
- Steve Summut once wrote:
- >
- [snip snip]
- > > (I'd rather write it like `char* bar()', but that's just my $0.02)
- >
- > Let me ask you one question, if I may. We can, if we want,
- > declare two variables in one declaration:
- >
- > int i, j;
- >
- > How would you prefer to write a single declaration of two pointer
- > variables, or two functions returning pointers? (I'm not trying
- > to give you a hard time; I'm just curious.)
-
- Okay: My $0.02 ;-)
-
- One declaration of two pointer variables would go like:
- `int *a, *b;'.
- One declarations of two functions returning pointers would not be
- written. It would be two declarations.
-
- I think it is rather confusing to write `char *foo(), *bar();'. Aand of
- course you can go crazy and have 80 functions in one declaration...
- It'll make a mess, I think.
-
- It won't make a mess, though, when you have: `int *i1, ..., *i80;'.
-
- Well, to make a longer story shorter, I just don't like the `*name'
- notation for functions. Besides that, at the company where I work,
- nobody uses the *name notation for functions but still for variables. So
- for that environment, I'm just fine.
-
- If, with another project, someone would favor the notation I don't
- really like but kinda have to follow, I would do it, because it's
- consistent.
-
- Basically I don't really care what notation somebody uses, but when he
- goes from
- `int* i;' to 'int *j;' I would tell him to make up his mind.
-
- Regards,
- Guus
-